﻿@model BenzInfo.Hockey.Grenadiers.Models.Team

@{
    ViewBag.Title = BenzInfo.Hockey.Grenadiers.Resources.Dictionary.Edit;
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("Edit", "Teams", FormMethod.Post, new { @encType = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Team</legend>

        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.Picture)
        @Html.HiddenFor(model => model.Logo)
        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Year)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Year)
            @Html.ValidationMessageFor(model => model.Year)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Logo)
        </div>
        <div class="editor-field">
            <input class="upload" type="file" name="logoFile" id="Logo" />
            <input type="checkbox" name="nologo" id="nologo" />
            <label for="nologo">@BenzInfo.Hockey.Grenadiers.Resources.Dictionary.NoPicture</label>
            @Html.ValidationMessageFor(model => model.Logo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Picture)
        </div>
        <div class="editor-field">
            <input class="upload" type="file" name="teamFile" id="Picture" />
            <input type="checkbox" name="nopicture" id="nopicture" />
            <label for="nopicture">@BenzInfo.Hockey.Grenadiers.Resources.Dictionary.NoPicture</label>
            @Html.ValidationMessageFor(model => model.Picture)
        </div>
    </fieldset>
}